home *** CD-ROM | disk | FTP | other *** search
- Path: newsjunkie.ans.net!butch!sunfse!usenet
- From: Melnick Andy <melnick@lmsc.lockheed.com>
- Newsgroups: comp.lang.c++
- Subject: SGI C++ volatile keyword and/or #pragma pack
- Date: 12 Jan 1996 23:36:32 GMT
- Organization: Lockheed Martin Missiles and Space Company, Sunnyvale, Ca.
- Message-ID: <4d6ra1$cvf@dialup.ese.lmsc.lockheed.com>
- NNTP-Posting-Host: limburger.ese.lmsc.lockheed.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1IS (X11; I; IRIX 5.3 IP22)
- X-URL: news:comp.lang.c++
-
- We've encountered a difficulty (problem?) with the SGI Irix 5.3 C++ compiler
- (version 4.0?) in which the compiler apparently forces word/longword alignment
- within structures for word/longwords (2/4 byte variables). We've tried
- specifying the "#pragma pack(n)" directive -- it works with the C compiler, but
- the C++ (CC) compiler fails with "warning(3247): unrecognized #pragma". We've
- also tried specifying the "volatile" keyword in association with the structure,
- but apparently the compiler is ignoring our attempt at guidance. Anybody know
- if there's a way to force the compiler to forego padding?
-
-